//
//  AttackAction.h
//  FruitCrush
//
//  Created by gaoyu on 15/7/9.
//
//

#ifndef __FruitCrush__AttackAction__
#define __FruitCrush__AttackAction__

#include "cocos2d.h"
USING_NS_CC;

typedef enum {
    SwordAttack = 0,
    ArrowAttack,
    FireAttack,
    LightAttack,
    HealthAttack,
    BombAttack,
} AttackType;

class AttackAction : public cocos2d::Layer
{
public:
    static AttackAction *create(int type);
    bool init(int type);
    AttackAction();
    
private:
    void animationInit(int type);
    void callback(Ref* target);
    const std::string getActionPlistName(int type);
    const std::string getActionFileName(int type,int index);
    int getActionCount(int type);
    
    
};

#endif /* defined(__FruitCrush__AttackAction__) */
